#include<iostream>

using namespace std;
class Rectangle
{
	private:
		double length;
		double width;
		double area;
	public:
		Rectangle(int a=0,int b=0);
		double Area();
		void outputS()
		{
			cout<<this->area;
		}
};
class Cuboid:public Rectangle
{
	private:
		double height;
		double val;
	public:
		void Val();
		Cuboid(int a=0,int b=0,int h=0);
		void outputV()
		{
			cout<<this->val;
		}
};
double Rectangle::Area()
{
	this->area=this->length*this->width;
	return this->area;
}
Rectangle::Rectangle(int a,int b)
{
	this->length=a;
	this->width=b;
}
Cuboid::Cuboid(int a,int b,int h):Rectangle(a,b)
{
	this->height=h;
}
void Cuboid::Val()
{
	this->val=this->height*this->Area();
}
int main()
{
	double a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	Rectangle s(a,b);
	Cuboid C(c,d,e);
	s.Area();
	s.outputS();
	cout<<' ';
	C.Val();
	C.outputV();
	return 0;
}
